Optimal. Leaf size=133 \[ -\frac {c+d x}{4 f \left (a^2 \tanh (e+f x)+a^2\right )}+\frac {x (c+d x)}{4 a^2}-\frac {3 d}{16 f^2 \left (a^2 \tanh (e+f x)+a^2\right )}+\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}-\frac {c+d x}{4 f (a \tanh (e+f x)+a)^2}-\frac {d}{16 f^2 (a \tanh (e+f x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3479, 8, 3730} \[ -\frac {c+d x}{4 f \left (a^2 \tanh (e+f x)+a^2\right )}+\frac {x (c+d x)}{4 a^2}-\frac {3 d}{16 f^2 \left (a^2 \tanh (e+f x)+a^2\right )}+\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}-\frac {c+d x}{4 f (a \tanh (e+f x)+a)^2}-\frac {d}{16 f^2 (a \tanh (e+f x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3479
Rule 3730
Rubi steps
\begin {align*} \int \frac {c+d x}{(a+a \tanh (e+f x))^2} \, dx &=\frac {x (c+d x)}{4 a^2}-\frac {c+d x}{4 f (a+a \tanh (e+f x))^2}-\frac {c+d x}{4 f \left (a^2+a^2 \tanh (e+f x)\right )}-d \int \left (\frac {x}{4 a^2}-\frac {1}{4 f (a+a \tanh (e+f x))^2}-\frac {1}{4 f \left (a^2+a^2 \tanh (e+f x)\right )}\right ) \, dx\\ &=-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {c+d x}{4 f (a+a \tanh (e+f x))^2}-\frac {c+d x}{4 f \left (a^2+a^2 \tanh (e+f x)\right )}+\frac {d \int \frac {1}{(a+a \tanh (e+f x))^2} \, dx}{4 f}+\frac {d \int \frac {1}{a^2+a^2 \tanh (e+f x)} \, dx}{4 f}\\ &=-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \tanh (e+f x))^2}-\frac {c+d x}{4 f (a+a \tanh (e+f x))^2}-\frac {d}{8 f^2 \left (a^2+a^2 \tanh (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \tanh (e+f x)\right )}+\frac {d \int 1 \, dx}{8 a^2 f}+\frac {d \int \frac {1}{a+a \tanh (e+f x)} \, dx}{8 a f}\\ &=\frac {d x}{8 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \tanh (e+f x))^2}-\frac {c+d x}{4 f (a+a \tanh (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \tanh (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \tanh (e+f x)\right )}+\frac {d \int 1 \, dx}{16 a^2 f}\\ &=\frac {3 d x}{16 a^2 f}-\frac {d x^2}{8 a^2}+\frac {x (c+d x)}{4 a^2}-\frac {d}{16 f^2 (a+a \tanh (e+f x))^2}-\frac {c+d x}{4 f (a+a \tanh (e+f x))^2}-\frac {3 d}{16 f^2 \left (a^2+a^2 \tanh (e+f x)\right )}-\frac {c+d x}{4 f \left (a^2+a^2 \tanh (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.54, size = 114, normalized size = 0.86 \[ \frac {\text {sech}^2(e+f x) \left (\left (4 c f (4 f x+1)+d \left (8 f^2 x^2+4 f x+1\right )\right ) \sinh (2 (e+f x))+\left (4 c f (4 f x-1)+d \left (8 f^2 x^2-4 f x-1\right )\right ) \cosh (2 (e+f x))-8 (2 c f+2 d f x+d)\right )}{64 a^2 f^2 (\tanh (e+f x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 192, normalized size = 1.44 \[ -\frac {16 \, d f x - {\left (8 \, d f^{2} x^{2} - 4 \, c f + 4 \, {\left (4 \, c f^{2} - d f\right )} x - d\right )} \cosh \left (f x + e\right )^{2} - 2 \, {\left (8 \, d f^{2} x^{2} + 4 \, c f + 4 \, {\left (4 \, c f^{2} + d f\right )} x + d\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) - {\left (8 \, d f^{2} x^{2} - 4 \, c f + 4 \, {\left (4 \, c f^{2} - d f\right )} x - d\right )} \sinh \left (f x + e\right )^{2} + 16 \, c f + 8 \, d}{64 \, {\left (a^{2} f^{2} \cosh \left (f x + e\right )^{2} + 2 \, a^{2} f^{2} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + a^{2} f^{2} \sinh \left (f x + e\right )^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 109, normalized size = 0.82 \[ \frac {{\left (8 \, d f^{2} x^{2} e^{\left (4 \, f x + 4 \, e\right )} + 16 \, c f^{2} x e^{\left (4 \, f x + 4 \, e\right )} - 16 \, d f x e^{\left (2 \, f x + 2 \, e\right )} - 4 \, d f x - 16 \, c f e^{\left (2 \, f x + 2 \, e\right )} - 4 \, c f - 8 \, d e^{\left (2 \, f x + 2 \, e\right )} - d\right )} e^{\left (-4 \, f x - 4 \, e\right )}}{64 \, a^{2} f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.24, size = 331, normalized size = 2.49 \[ \frac {2 d \left (\frac {\left (f x +e \right ) \sinh \left (f x +e \right ) \left (\cosh ^{3}\left (f x +e \right )\right )}{4}+\frac {3 \left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{8}+\frac {3 \left (f x +e \right )^{2}}{16}-\frac {\left (\cosh ^{4}\left (f x +e \right )\right )}{16}-\frac {3 \left (\cosh ^{2}\left (f x +e \right )\right )}{16}\right )+2 c f \left (\left (\frac {\left (\cosh ^{3}\left (f x +e \right )\right )}{4}+\frac {3 \cosh \left (f x +e \right )}{8}\right ) \sinh \left (f x +e \right )+\frac {3 f x}{8}+\frac {3 e}{8}\right )-2 d e \left (\left (\frac {\left (\cosh ^{3}\left (f x +e \right )\right )}{4}+\frac {3 \cosh \left (f x +e \right )}{8}\right ) \sinh \left (f x +e \right )+\frac {3 f x}{8}+\frac {3 e}{8}\right )-2 d \left (\frac {\left (f x +e \right ) \left (\cosh ^{4}\left (f x +e \right )\right )}{4}-\frac {\left (\cosh ^{3}\left (f x +e \right )\right ) \sinh \left (f x +e \right )}{16}-\frac {3 \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{32}-\frac {3 f x}{32}-\frac {3 e}{32}\right )-\frac {\left (\cosh ^{4}\left (f x +e \right )\right ) c f}{2}+\frac {\left (\cosh ^{4}\left (f x +e \right )\right ) d e}{2}-d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )-c f \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f^{2} a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.45, size = 106, normalized size = 0.80 \[ \frac {1}{16} \, c {\left (\frac {4 \, {\left (f x + e\right )}}{a^{2} f} - \frac {4 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )}}{a^{2} f}\right )} + \frac {{\left (8 \, f^{2} x^{2} e^{\left (4 \, e\right )} - 8 \, {\left (2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (-2 \, f x\right )} - {\left (4 \, f x + 1\right )} e^{\left (-4 \, f x\right )}\right )} d e^{\left (-4 \, e\right )}}{64 \, a^{2} f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.14, size = 89, normalized size = 0.67 \[ \frac {d\,x^2}{8\,a^2}-{\mathrm {e}}^{-4\,e-4\,f\,x}\,\left (\frac {d+4\,c\,f}{64\,a^2\,f^2}+\frac {d\,x}{16\,a^2\,f}\right )-{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (\frac {d+2\,c\,f}{8\,a^2\,f^2}+\frac {d\,x}{4\,a^2\,f}\right )+\frac {c\,x}{4\,a^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {c}{\tanh ^{2}{\left (e + f x \right )} + 2 \tanh {\left (e + f x \right )} + 1}\, dx + \int \frac {d x}{\tanh ^{2}{\left (e + f x \right )} + 2 \tanh {\left (e + f x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________